package scenarios;

import units.UnitSet;
import game.Player;

public abstract class AbstractDefendYourCityScenario extends AbstractScenario {

	private UnitSet enemy = new UnitSet();
	private long attacksAtRound = 500;
	
	public UnitSet getEnemy() {
		return enemy;
	}

	public void setEnemy(UnitSet enemy) {
		this.enemy = enemy;
	}

	public long getAttacksAtRound() {
		return attacksAtRound;
	}

	public void setAttacksAtRound(long attacksAtRound) {
		this.attacksAtRound = attacksAtRound;
	}

	@Override
	public String getDescription() {
		return "Defend your city! The enemy will attack you after " + attacksAtRound + " rounds with " + enemy.toString() + ". To win this scenario, you have to win this fight.";
	}

	@Override
	public boolean checkScenarioGameTimeout(long round) {
		return false;
	}

	@Override
	public boolean checkWinConditions(Player p) {
		if (p.getRoundnr() == attacksAtRound) {
			p.setGameActive(false);
		}
		return false;
	}

}
